-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add nullptr checks in ContentAppPlatform mContentAppFactory #41827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add nullptr checks in ContentAppPlatform mContentAppFactory #41827
Conversation
Add additional checks inside ContentAppPlatform to first check if mContentAppFactory is null to prevent nullptr dereference crashes. [Problem] There are several dereferences to mContentAppFactory without first checking if pointer is valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request adds necessary nullptr checks for mContentAppFactory in several methods within ContentAppPlatform.cpp. These changes are crucial for preventing potential nullptr dereference crashes, thereby improving the robustness and stability of the application platform. The added checks are correctly implemented using the appropriate VerifyOrReturnValue and VerifyOrReturnError macros, ensuring that the functions fail gracefully if mContentAppFactory is not initialized. The changes are clear, correct, and effectively address the identified issue.
|
PR #41827: Size comparison from bc6337d to 2588315 Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
Add additional checks inside ContentAppPlatform to first check if mContentAppFactory is null to prevent nullptr dereference crashes.
Related issues
[Problem]
There are several dereferences to mContentAppFactory without first checking if pointer is valid.